package GUI.common.cmd;

public class Factory {
	private final static String PACKAGE_BASE="GUI";
	
	public static ClientCommand getCommand(String actionCommand) {
		Class c=null;
		Object cmd = null;
		String theClass;
		
		//System.out.println(PACKAGE_BASE+"."+actionCommand);
		try {
			c = Class.forName(PACKAGE_BASE+"."+actionCommand);
			cmd =  c.newInstance();
		}
		catch (Exception e) {
			e.printStackTrace();
		}
		return (ClientCommand)cmd;
	}
	
}
